package com.movie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.movie.bean.Recharge;
import com.movie.bean.vo.RechargeQueryVO;
import com.movie.mapper.RechargeMapper;
import com.movie.service.RechargeService;
import com.movie.utils.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Liu Jiaquan
 * @Description
 * @date 2024/8/5 19:40
 */
@Service
public class RechargeServiceImpl implements RechargeService {

    @Autowired
    private RechargeMapper rechargeMapper;

    @Override
    public Page<Recharge> rechargePage(RechargeQueryVO rechargeQueryVO) {
        List<Recharge> recharges = rechargeMapper.selectByParams(rechargeQueryVO);
        return PageUtil.PaginatedResult(recharges, rechargeQueryVO.getPageNo(), rechargeQueryVO.getPageSize());
    }
}
